class APIManager

  IMAGE_BASE_PATH = "http://api.jtuntech.com/event/2015/mocha/index/uploads/"

  include HTTParty
  base_uri 'http://api.jtuntech.com/event/2015/mocha/App/index.php'

  def sellerInfo(id)
    res = self.class.get("?act=Seller&mod=Info&seller=#{id}")
    JSON.parse(res.to_str)
  end

  def goodsInfo(goodsId)
    res = self.class.get("?act=Goods&mod=Info&goods=#{goodsId}")
    JSON.parse(res.to_str)["Info"]
  end

end
